package st.business.tepth.business.taskallocation.modifytrouble;

import java.util.List;

import io.reactivex.disposables.Disposable;
import st.business.tepth.base.OnDataConvertListener;
import st.shadow.library.core.base.mvp.BaseModel;
import st.shadow.library.core.base.mvp.BasePresenter;
import st.shadow.library.core.base.mvp.BaseView;
import st.shadow.library.ui.recycler.MultipleItemEntity;

/**
 * Author: shadow
 * Email:  1025431817@qq.com
 * Time:   2019-07-24 19:35
 */

public interface ModifyTroubleContract {
    interface View extends BaseView {
        void showData(List<MultipleItemEntity> list);

        void modifySucceed();

        void modifyFailed(String msg);
    }

    interface Model extends BaseModel {
        Disposable getTroubleList(String token, int repairId, OnDataConvertListener
                <List<MultipleItemEntity>> listener);

        Disposable modifyTroubleClassification(String token, int repairId,
                                               int phenomenonId, int targetSeriesId,
                                               OnDataConvertListener<String> modifyListener,
                                               OnDataConvertListener<List<MultipleItemEntity>>
                                               dataListener);
    }

    abstract class Presenter extends BasePresenter<View> {
        abstract void getTroubleList(String token, int repairId);

        abstract void modifyTroubleClassification(String token, int repairId,
                                                  int phenomenonId, int targetSeriesId);
    }
}
